<?php

require_once 'layout.php';

class Controller_Categories extends Controller_Layout {
    
    public function actionIndex($category_id) {
        $Content = new View('categories/categoriesIndex');

        $this->template->title = 'All products';
        $this->template->content = $Content;
        $this->template->header->active_category_id = $category_id;
        
        $Categories = new Model_Categories();
        $Content->categories = $Categories->getSubCategories($category_id);
    }
}